
  <div class="x_panel">
    <div class="x_content row">
      <div class=" col-md-6 col-sm-12 col-xs-12">
        <form class="form-horizontal form-label-left" action="{$actionUrl}" method="post">
          <div class="form-group">
            <label class="control-label col-md-4 col-sm-4 col-xs-12">商家：</label>
            <div class="checkbox col-md-8 col-sm-8 col-xs-12">
              <select class="form-control" name="form[shop_id]">
                <option value="0">请选择</option>
                {foreach $shop AS $key => $value}
                <option value="{$value.shop_id}">{$value.shop_name}</option>
                {/foreach}
              </select>
            </div>
            <label class="control-label col-md-4 col-sm-4 col-xs-12">用户：</label>
            <div class="checkbox col-md-8 col-sm-8 col-xs-12">
              <select class="form-control" name="form[user_id]">
                <option value="0">请选择</option>
                {foreach $user AS $key => $value}
                <option value="{$value.user_id}">{$value.phone}</option>
                {/foreach}
              </select>
            </div>
            <label class="control-label col-md-4 col-sm-4 col-xs-12">类型：</label>
            <div class="checkbox col-md-8 col-sm-8 col-xs-12">
              <input class=""  type="radio" name="form[type]" value="1" checked="checked">店主
              <input class=""  type="radio" name="form[type]" value="2" checked="checked">店长
            </div>

              <label class="control-label col-md-4 col-sm-4 col-xs-12">店主或者店长名称：</label>
              <div class="checkbox col-md-8 col-sm-8 col-xs-12">
                  <input class="form-control col-md-3 col-xs-12" required="required" type="text" name="form[name]" value="">
              </div>

            <label class="control-label col-md-4 col-sm-4 col-xs-12">合同开始时间:</label>
            <div class="col-md-8 col-sm-8 col-xs-12">
            <input type="text"  name="form[contract_start_time]" value="" placeholder="合同开始时间" id="J_dh_start" class="form-control-new" >
            </div>

            <label class="control-label col-md-4 col-sm-4 col-xs-12">合同结束时间:</label>
            <div class="col-md-8 col-sm-8 col-xs-12">
              <input type="text"  name="form[contract_end_time]" value="" placeholder="合同结束时间" id="J_dh_end" class="form-control-new" >
            </div>
          </div>


          <div class="col-md-3 col-sm-12 col-xs-12 col-md-offset-4 col-sm-offset-4">
            <button class="btn btn-success" type="submit">新增</button>
          </div>
        </form>
      </div>
    </div>
  </div>
  <script type="text/javascript" src="{$theme}/libs/js/datepicker/bootstrap-datetimepicker.min.js"></script>
  <script>
      var startDate = $('#J_dh_start').datetimepicker({
          format: "yyyy-MM-dd",
          autoclose: true,
          todayBtn: true,
          minView: 2,
      }).on('changeDate', function(ev) {
          //var evDate = ev.date.getFullYear() + '-' + (ev.date.getMonth() + 1) + '-' + ev.date.getDate();
          //$('#J_dh_end').datetimepicker('setStartDate', evDate);

      });

      var startDate = $('#J_dh_end').datetimepicker({
          format: "yyyy-MM-dd",
          autoclose: true,
          todayBtn: true,
          minView: 2,
      }).on('changeDate', function(ev) {
          //var evDate = ev.date.getFullYear() + '-' + (ev.date.getMonth() + 1) + '-' + ev.date.getDate();
          //$('#J_dh_end').datetimepicker('setStartDate', evDate);

      });
  </script>